package com.etc.entity;

import java.io.Serializable;
import java.util.List;

/**
 * blog实体类
 */
public class Blog  implements Serializable {
    private Integer id;
    private String title ;
    private String content;

    //增加了新的关联关系
    //blog应该属于特定的blogtype
    private BlogType blogType;
    //blog应该是由某个用户发布的
    private Users users;
    //指定评论信息(一个blog下可能有多个评论)
    private List<Comments> list;

    public List<Comments> getList() {
        return list;
    }

    public void setList(List<Comments> list) {
        this.list = list;
    }

    public BlogType getBlogType() {
        return blogType;
    }

    public void setBlogType(BlogType blogType) {
        this.blogType = blogType;
    }

    public Users getUsers() {
        return users;
    }

    public void setUsers(Users users) {
        this.users = users;
    }

    public Blog() {
    }

    public Blog(int id, String title, String content) {
        this.id = id;
        this.title = title;
        this.content = content;
    }


    @Override
    public String toString() {
        return "Blog{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", blogType=" + blogType +
                ", users=" + users +
                '}';
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
}
